Skip to content

[26.04_linux-nvidia-bos] watchdog: sbsa_gwdt: add early_enable module parameter - #558

Closed
kbutala-nv wants to merge 1 commit into
NVIDIA:26.04_linux-nvidia-bosfrom
kbutala-nv:sbsa-watchdog-bos
Closed

[26.04_linux-nvidia-bos] watchdog: sbsa_gwdt: add early_enable module parameter#558
kbutala-nv wants to merge 1 commit into
NVIDIA:26.04_linux-nvidia-bosfrom
kbutala-nv:sbsa-watchdog-bos

Conversation

@kbutala-nv

@kbutala-nv kbutala-nv commented Sep 1, 2026

Copy link
Copy Markdown

This PR contains backport of change https://patch.msgid.link/[email protected]

We need this patch to support newer firmware revisions.

(cherry picked from commit 11f93e639d513cbfaa78237cd163039d27fea33c linux-next)

@nirmoy nirmoy added the help wanted Extra attention is needed label Sep 1, 2026
@nirmoy

nirmoy commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

BaseOS Kernel Review

Warning

⚠️ Review needs attention

SBSA watchdog early_enable can leave hardware armed after driver unbind or unload, removing keepalive access and eventually resetting the machine.

Findings: Critical 0 · High 1 · Medium 0 · Low 0

🔍 Review artifacts

📦 Kernel deb builds — 🟢 2/2 passed

Note

Build reports and debs are retained for 10 days after the PR closes.

Review metadata
  • Reviewed head: 0063e504f570
  • Overall status: attention needed
  • Architectures: 2/2 successful

This comment is maintained by BaseOS Reviewer and updated when the GitHub watcher publishes a newer review.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

PR Validation Report

Patchscan ✅ No Missing Fixes

All cherry-picked commits checked — no missing upstream fixes found.

PR Lint ❌ Errors found

Details
Checking 1 commits...

Cherry-pick digest:
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local        │ Referenced upstream / Patch subject                              │ Patch-ID   │ Subject │ SoB chain                 │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 0063e504f570 │ watchdog: sbsa_gwdt: add early_enable module parameter           │ match      │ found   │ ok, backporter: kbutala   │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘

Lint: all checks passed.

PR metadata:
E: PR targets 26.04_linux-nvidia-bos but body has no https://bugs.launchpad.net/... link

@kbutala-nv
kbutala-nv force-pushed the sbsa-watchdog-bos branch 2 times, most recently from 6b2861b to f92bed6 Compare September 1, 2026 11:27
@kbutala-nv kbutala-nv changed the title [26.04_linux-nvidia-bos] NVIDIA: SAUCE: watchdog: sbsa_gwdt: add early_enable module parameter [26.04_linux-nvidia-bos] watchdog: sbsa_gwdt: add early_enable module parameter Sep 1, 2026
@nirmoy

nirmoy commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Is this patch needed for Vera too @kbutala-nv ?

@nvmochs

nvmochs commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Same comment as in PR 557, please pick with -xs and append "linux-next" after the SHA.

@kbutala-nv

Copy link
Copy Markdown
Author

Is this patch needed for Vera too @kbutala-nv ?

No, it is not needed for Vera

On SBSA platforms using standard UEFI firmware (such as EDK II), the
watchdog timer is often enabled during early boot stages but explicitly
disabled by the firmware before handing over control to the OS (e.g.,
during ExitBootServices). This is done to prevent unintended resets
while the OS is loading, assuming the OS watchdog driver will take over.

However, this leaves a protection gap. If the system hangs between the
firmware handover and the userspace watchdog daemon startup, the hardware
watchdog will not fire to recover the system. For safety-critical systems
that require continuous hardware watchdog protection from the earliest
possible moment, this gap is problematic.

Add an 'early_enable' module parameter to allow the kernel driver to
re-enable the watchdog immediately during probe if it was left disabled
by the firmware. By setting the WDOG_HW_RUNNING status bit, the watchdog
core is instructed that the hardware is active. As a result, the core's
pre-userspace handler (controlled by 'handle_boot_enabled') will
automatically issue periodic keepalives until userspace opens the device.

This bridges the protection gap seamlessly without requiring firmware
modifications and without risking unintended resets during kernel boot.

The parameter defaults to false to preserve the traditional behavior.

Signed-off-by: Zexin Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
(cherry picked from commit 11f93e639d513cbfaa78237cd163039d27fea33c linux-next)
Signed-off-by: Kaushal Rajeev Butala <[email protected]>
@kbutala-nv

Copy link
Copy Markdown
Author

Same comment as in PR 557, please pick with -xs and append "linux-next" after the SHA.

done

@nirmoy

nirmoy commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

@jamieNguyenNVIDIA

Copy link
Copy Markdown
Collaborator

Acked-by: Jamie Nguyen <[email protected]>

@nirmoy nirmoy added has_2_acks and removed help wanted Extra attention is needed has_1_ack labels Sep 2, 2026
@nvmochs

nvmochs commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Acked-by: Matthew R. Ochs <[email protected]>

@jamieNguyenNVIDIA

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants